package view.client;

import java.awt.Dimension;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.Locale;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

import controller.Controller;

public class MainFrame extends JFrame {

	private static final long serialVersionUID = 1L;
	private Controller controller;

	/**
	 * Erzeugt ein MainFrame.
	 * 
	 */
	public MainFrame() {
		super("IbeA - Der Aspirationscheck");
		setResizable(false);
		setVisible(true);
		setPreferredSize(new Dimension(1024,700));
		
		JOptionPane.setDefaultLocale(Locale.GERMAN);
				
		addWindowListener(new WindowListener(){

			@Override
			public void windowActivated(WindowEvent arg0) {
				
			}

			@Override
			public void windowClosed(WindowEvent arg0) {
				
			}

			@Override
			public void windowClosing(WindowEvent arg0) {
				
				System.exit(0);
				
			}

			@Override
			public void windowDeactivated(WindowEvent arg0) {
				
			}

			@Override
			public void windowDeiconified(WindowEvent arg0) {
				
			}

			@Override
			public void windowIconified(WindowEvent arg0) {
				
			}

			@Override
			public void windowOpened(WindowEvent arg0) {
				
			}
			
		});
	}
	
	public void setMainController(Controller controller){
		this.controller = controller;
	}

}
